package jsyf.oa.entity.attach;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import java.io.Serializable;

/**
 * Created by Administrator on 2017/11/24 0024.
 */
public class AttachmentEntity extends BaseEntity implements Serializable {


    /**
     * 附件地址
     */
    private String url;

    /**
     * 附件名称
     */
    private String name;

    /** 附件类型 */
    private String fileType;

    /** 文件扩展名 */
    private String extension;

    /** 文件大小 */
    private String fileSize;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public String getExtension() {
        return extension;
    }

    public void setExtension(String extension) {
        this.extension = extension;
    }

    public String getFileSize() {
        return fileSize;
    }

    public void setFileSize(String fileSize) {
        this.fileSize = fileSize;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("DEL_FLAG", getDelFlag());
        obj.put("FILE_URL", getUrl());
        obj.put("FILE_NAME", getName());
        obj.put("FILE_TYPE", getFileType());
        obj.put("EXTENSION", getExtension());
        obj.put("FILE_SIZE", getFileSize());
        obj.put("CREATE_TIME", getCreateTime());
        return obj;
    }

    public JSONObject getJSONObjectId() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_ATTACHMENT";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("FILE_NAME", "name");
        obj.put("FILE_URL", "url");
        return obj;
    }

}
